#include <iostream>
#include "ArrayList.h"
using namespace std;

int main(void) {
	ArrayList array;

	array.insert(11);
	array.insert(12);
	array.insert(13);
	array.insert(14);
	array.printArray("Test insert(ele)");
	cout << "sizeOf:" << array.sizeOf() << endl;

	array.insert(1, 21); // 11,21,12,13,14
	array.insert(1, 22); // 11,22,21,12,13,14
	array.insert(0, 23); // 23,11,22,21,12,13,14
	array.printArray("Test insert(idx, ele)");
	cout << "sizeOf:" << array.sizeOf() << endl;

	array.insert(1, 31); // 23,31,11,22,21,12,13,14
	array.insert(1, 32); // 23,32,31,11,22,21,12,13,14
	array.insert(0, 33); // 33,23,32,31,11,22,21,12,13,14
	array.insert(9, 34); // 33,23,32,31,11,22,21,12,13,34,14
	array.printArray("Test capacity");
	cout << "sizeOf:" << array.sizeOf() << endl;

	array.set(9, 44); // 33,23,32,31,11,22,21,12,13,44,14
	array.printArray("Test capacity");
	cout << "sizeOf:" << array.sizeOf() << endl;

	cout << "indexOf: " << array.indexOf(44) << endl;

	array.remove(1);
	array.remove(9);
	array.printArray("Test remove(idx)"); // 33,32,31,11,22,21,12,13,34
	cout << "sizeOf:" << array.sizeOf() << endl;

	cout << "Test isEmpty(): " << array.isEmpty();
	array.clear();
	cout << "Test isEmpty(): " << array.isEmpty();
	array.printArray("Test clear");
	cout << "sizeOf:" << array.sizeOf() << endl;
	return 0;
}